import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /contract/create
 */
export function postContractCreate(params: PostContractCreateParams, input?: PostContractCreateInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        siteId: params.siteId,
        contractName: params.contractName,
        remark: params.remark,
    };
    return request.post<DeepRequired<any>>(`/contract/create`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostContractCreateParams {
    siteId: number;
    contractName: string;
    remark?: string;
}

export interface PostContractCreateInput {
    file: File;
}
